Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add entry to subevent log when filtering out recipient #35509

Merged
merged 11 commits into from
Dec 12, 2024

Conversation

MartinRiese
Copy link
Contributor

@MartinRiese MartinRiese commented Dec 11, 2024

Product Description

When alert recipients are filtered out it is hard to figure out why. Currently we have bug in production that we cannot reproduce otherwise. This will help determine what exactly is happening.

Technical Summary

https://dimagi.atlassian.net/browse/SUPPORT-22779

Feature Flag

None

Safety Assurance

Automated tests and tested on staging.

Safety story

Automated test coverage

Yes.

QA Plan

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

Copy link

sentry-io bot commented Dec 11, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: corehq/messaging/scheduling/scheduling_partitioned/models.py

Function Unhandled Issue
send_current_event_content_to_recipients AttributeError: 'NoneType' object has no attribute 'case_json' corehq.messaging.scheduling.tasks.handle_case_alert_sch...
Event Count: 15

Did you find this useful? React with a 👍 or 👎

@MartinRiese MartinRiese marked this pull request as ready for review December 11, 2024 16:49
@MartinRiese MartinRiese requested review from a team, minhaminha and Jtang-1 and removed request for a team December 11, 2024 16:49
Copy link
Contributor

@Jtang-1 Jtang-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments

corehq/apps/sms/models.py Outdated Show resolved Hide resolved
@@ -344,7 +344,7 @@ def log_filtered_recipient(filtered_recipient, reason):
filtered_recipient,
content,
)
sub_event.error(MessagingEvent.FILTER_MISMATCH, reason)
sub_event.error(MessagingEvent.FILTER_MISMATCH, reason, MessagingEvent.STATUS_COMPLETED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes sense to do

@MartinRiese MartinRiese merged commit af29859 into master Dec 12, 2024
12 of 13 checks passed
@MartinRiese MartinRiese deleted the riese/log_filter branch December 12, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants